<%@page import="cn.com.dhcc.app.core.base.BaseController"%>
<%@page import="cn.com.dhcc.app.core.CoreEnv.CoreInitCtx"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<script type="text/javascript">
/**
 * 更新用户信息
 */
function userPasswordChange(){
	$.ajax({
		   type: "GET",
		   dataType:"html",
		   cache: false,
		   url : _ctx + "/pub/sysmgr/usermgr/pwd_update.do",
		   data: {},
		   beforeSend : function(){
	       },
		   success: function(content){
			   $('#userInfoChangePasswordDiv').html( content );
			   $('#userInfoChangePasswordModal').modal('show');
		   },
		   error:function(){
			   ui.msg( '请求发送失败！',0 );
		   }
	});
}
</script>
<%
pageContext.setAttribute("version", CoreInitCtx.version);
pageContext.setAttribute("roleTypeStr", BaseController.getRoleTypeStr(session));
/* pageContext.setAttribute("regionName", NodeRegionService.getLocalRegionName()); */
%>

<div class="navbar navbar-default" id="navbar">
	<div class="navbar-container" id="navbar-container">
		<div class="navbar-header pull-left">
			<a class="navbar-brand" href="javascript:void(0)"  >
				<img src="${ctx}/static/images/logo-water.png" width="100px" style="margin:0px -10px 0px 0px;" alt=""/>&nbsp;
					<img src=${ctx}/static/images/22.png style='width: 150px;height: 20px'>&nbsp; <small style="font-size: 14px">&nbsp;${version}</small>
			</a>
		</div>
		<div class="navbar-header pull-right" role="navigation">
			<ul class="nav ace-nav">
				<li class="light-blue">
					<a data-toggle="dropdown" href="#" class="dropdown-toggle" >
						<img class="nav-user-photo" src="${ctx}/static/ace/avatars/avatar2.png" />
						<span class="user-info">
						<small>欢迎您！</small>
						${sessionScope._user_session.userName } ${roleTypeStr }
						</span>
						<i class="icon-caret-down"></i>
					</a>
					<ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
						<li class=""></li>
						<li>
							<a href="javascript:void(0)" onclick="userPasswordChange()">
							<i class="icon-key"></i>
							修改用户密码
							</a>
						</li>
						<li>
							<a href="javascript:void(0)" onclick="javascript:ui.confirm('确定要退出么?',function(){self.location='${ctx}/pub/logout.do';});">
							<i class="icon-off"></i>
							退出
							</a>
						</li>
					</ul>
				</li>
			</ul>
		</div>
	</div>
</div>

<div id="userInfoChangePasswordModal" class="modal fade" role="dialog" tabindex="-1" aria-labelledby="查看" aria-hidden="false">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class='widget-header widget-header-small'><h5 class='smaller'> 更改用户密码</h5></div>
			<div id="userInfoChangePasswordDiv"></div>
		</div>
	</div>
</div>
